package web.Servlet;

import service.Serviceimpl.SudentServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;

@WebServlet(name = "szqxServlet" ,urlPatterns = "/qxxg")
public class szqxServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doPost(req, resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String pop = req.getParameter("zzz");
        String sname = req.getParameter("sname");
        String suser = req.getParameter("suser");
        System.out.println(pop+"--------"+sname+"--------------"+suser);
        ArrayList arrayList = new ArrayList();
        SudentServiceImpl sudentService = new SudentServiceImpl();
        arrayList.add(pop);
        arrayList.add(sname);
        arrayList.add(suser);
        boolean gaibian = sudentService.gaibian(arrayList);
        resp.getWriter().print(gaibian);
    }
}
